import os
import sys
from scrapy import cmdline

sys.path.append(os.path.dirname(os.path.abspath(__file__)))

if __name__ == '__main__':
    #添加小说
    # cmdline.execute('scrapy crawl haobqg -a href=http://www.haobqg.com/html/4_4506/'.split())
    # cmdline.execute('scrapy crawl haobqg_init'.split())
    #更新小说
    cmdline.execute('scrapy crawl haobqg -a id=220  -a type=updata'.split())
    #添加章节
    # cmdline.execute('scrapy crawl haobqg -a id=218  -a type=chapter  -a url=http://www.haobqg.com/html/4_4174/18295721.html -a no=4279'.split())
    # cmdline.execute('scrapy crawl haobqg_init'.split())
